package com.xqboss.apps.dto.synthesis;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "合成活动-方案配置-调整库存", description = "出入参数")
public class SynthesisPlanStockDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "产出id")
    @NotNull(message = "产出id不可为空")
    private Long resultId;

    @ApiModelProperty(value = "调整类型[1:追加;2:减少]")
    @NotNull(message = "调整类型不可为空")
    @Min(value = 1, message = "调整类型不合法")
    @Max(value = 2, message = "调整类型不合法")
    private Integer type;

    @ApiModelProperty(value = "库存")
    @NotNull(message = "库存数量格式不可为空")
    @Min(value = 1, message = "库存数量不合法")
    @Max(value = 99999, message = "库存数量不合法")
    private Integer num;
}
